/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package br.com.brasilerp.web;

import java.io.Serializable;
import javax.enterprise.context.SessionScoped;
import javax.faces.context.ExternalContext;
import javax.faces.context.FacesContext;
import javax.inject.Named;
import javax.servlet.jsp.PageContext;

/**
 *
 * @author rgrosz
 */

@SessionScoped
@Named
public class BrasilApp implements Serializable{
    private String name;
    private String contextPath;
    private String homePath;
    
    public BrasilApp(){        
        this.name = "Brasil App";
        
        FacesContext fc;
        fc =  FacesContext.getCurrentInstance() ;
        ExternalContext ex;
        ex = fc.getExternalContext();
        ex.getRequestContextPath();       
        contextPath = ex.getRequestContextPath();
        homePath=contextPath + "/faces";
    }
    public String getName(){
        return name;
    }
            
    public String getContextPath(){
        return this.contextPath;
    }
    
    public String getHomePath(){
        return this.homePath;
    }
}
